package com.gp.geits.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gp.geits.utils.PageUtils;
import com.gp.geits.entity.ResponseEntity;
import com.gp.geits.vo.AnswerSubmitVo;
import com.gp.geits.vo.IssueAndAnswerVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author lzf
 * @date 2022-03-09 15:36:11
 */
public interface ResponseService extends IService<ResponseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 提交问卷回答
     * @param submitVoList 回答信息集合
     * @param request 请求
     */
    void answerSubmit(List<AnswerSubmitVo> submitVoList, HttpServletRequest request);

    /**
     * 根据用户id查出问卷
     * @param request 请求
     * @return 问卷集合
     */
    List<String> checkQuestionnaireByUserId(HttpServletRequest request);

    /**
     * 根据问卷名称列出问题及回答
     * @param name 问卷名称
     * @param request 请求
     * @return 问卷、问题、回答
     */
    IssueAndAnswerVo issueAndAnswerByQuestionnaireName(String name, HttpServletRequest request);

    /**
     * 根据问卷名称列出所有问题及回答
     * @return 所有问题及回答集合
     */
    List<IssueAndAnswerVo> issueAndAnswerList();
}

